<!DOCTYPE html>
<html lang="<?php echo $lang; ?>">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo isset($t['siteTitle']) ? $t['siteTitle'] : '王者荣耀 - 官方网站'; ?></title>
    <meta name="description" content="<?php echo isset($t['metaDescription']) ? $t['metaDescription'] : '5v5英雄公平对战手游，国民MOBA手游大作'; ?>">
    <!-- 引入外部资源 -->
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind 配置 - 战争风格 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#C2410C', // 战旗红 - 主色调
                        secondary: '#1E3A8A', // 深海蓝 - 辅助色
                        accent: '#D97706', // 青铜金 - 强调色
                        dark: '#1F2937', // 深色背景
                        darker: '#111827', // 更深色背景
                        light: '#F3F4F6', // 浅色文本
                        metal: '#4B5563', // 金属灰
                    },
                    fontFamily: {
                        sans: ['"Noto Sans SC"', 'sans-serif'],
                        display: ['"Anton"', 'sans-serif']
                    },
                    animation: {
                        'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
                        'flare': 'flare 2s ease-in-out infinite alternate',
                        'march': 'march 15s linear infinite',
                    },
                    keyframes: {
                        flare: {
                            '0%': { 'box-shadow': '0 0 5px rgba(194, 65, 12, 0.7)' },
                            '100%': { 'box-shadow': '0 0 25px rgba(194, 65, 12, 0.9)' }
                        },
                        march: {
                            '0%': { 'background-position': '0 0' },
                            '100%': { 'background-position': '200px 0' }
                        }
                    }
                }
            }
        }
    </script>
    
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .text-shadow {
                text-shadow: 0 0 8px rgba(194, 65, 12, 0.6);
            }
            .text-shadow-lg {
                text-shadow: 0 0 15px rgba(194, 65, 12, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.5);
            }
            .bg-camo {
                background-image: 
                    linear-gradient(45deg, rgba(30, 58, 138, 0.1) 25%, transparent 25%),
                    linear-gradient(-45deg, rgba(30, 58, 138, 0.1) 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, rgba(30, 58, 138, 0.1) 75%),
                    linear-gradient(-45deg, transparent 75%, rgba(30, 58, 138, 0.1) 75%);
                background-size: 20px 20px;
                background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
            }
            .bg-stripe {
                background-image: linear-gradient(90deg, rgba(194, 65, 12, 0.1) 50%, transparent 50%);
                background-size: 40px 40px;
                animation: march 15s linear infinite;
            }
            .border-battle {
                border-image: linear-gradient(to right, #C2410C, #D97706, #C2410C) 1;
            }
            .battle-worn {
                box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5), 0 2px 5px rgba(0, 0, 0, 0.3);
            }
            .hero-pattern {
                background-image: radial-gradient(circle at 30% 40%, rgba(194, 65, 12, 0.15) 0%, transparent 60%);
            }
        }
    </style>
    
    <!-- 战争风格字体 -->
    <link href="https://fonts.googleapis.com/css2?family=Anton&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
</head>
<body class="bg-dark text-light font-sans bg-camo">
    <!-- 顶部军事警告条 -->
    <div class="bg-primary/90 text-white text-center py-2 text-sm font-medium">
        <p>新赛季即将开启 - 备战模式已激活</p>
    </div>

    <!-- 导航栏 - 战争指挥部风格 -->
    <header id="navbar" class="fixed w-full z-50 transition-all duration-300 bg-darker/90 backdrop-blur-sm border-b border-primary/30">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <!-- 网站Logo - 战旗风格 -->
            <a href="#" class="flex items-center">
                <div class="w-12 h-12 bg-primary flex items-center justify-center mr-3 border-2 border-accent battle-worn">
                    <span class="font-display text-white text-2xl font-bold tracking-wider">王</span>
                </div>
                <h1 class="text-2xl font-display text-white tracking-wider">王者荣耀</h1>
            </a>
            
            <!-- 桌面导航菜单 - 战术指令风格 -->
            <?php if(isset($t['nav']) && !empty($t['nav'])){?>
            <nav class="hidden md:flex items-center space-x-8">
                <?php foreach ($t['nav'] as $item): ?>
                    <a href="<?php echo isset($item['link']) ? $item['link'] : '#'; ?>" class="text-light/80 hover:text-primary transition-colors duration-300 font-medium <?php echo isset($item['isCta']) ? 'bg-primary hover:bg-primary/90 text-white px-6 py-2 rounded-sm border border-accent/50 shadow-lg shadow-primary/20' : ''; ?>">
                        <?php echo isset($item['name']) ? $item['name'] : ''; ?>
                    </a>
                <?php endforeach; ?>
            </nav>
            <?php }?>
            
            <!-- 语言选择器 - 战地通讯风格 -->
            <?php if(isset($t['lang']) && !empty($t['lang'])){?>
            <div class="hidden md:block relative">
                <button id="langToggle" class="flex items-center text-light/80 hover:text-primary transition-colors border border-metal/50 px-3 py-1.5 bg-darker">
                    <i class="fa fa-flag mr-2"></i>
                    <span><?php echo isset($t['lang'][$lang]) ? $t['lang'][$lang] : ''; ?></span>
                    <i class="fa fa-chevron-down ml-2 text-xs"></i>
                </button>
                <div id="langDropdown" class="absolute right-0 mt-2 w-36 bg-darker border border-primary/30 shadow-lg shadow-primary/5 hidden z-50">
                    <?php foreach ($availableLangs as $l): ?>
                        <a href="?lang=<?php echo $l; ?>" class="block px-4 py-2 hover:bg-primary/10 transition-colors <?php echo $l == $lang ? 'bg-primary/10' : ''; ?>">
                            <?php echo isset($t['lang'][$l]) ? $t['lang'][$l] : ''; ?>
                        </a>
                    <?php endforeach; ?>
                </div>
            </div>
            <?php }?>
            
            <!-- 移动端菜单按钮 - 军事通讯器风格 -->
            <button id="mobileMenuBtn" class="md:hidden text-light text-2xl p-2 bg-darker border border-primary/30">
                <i class="fa fa-bars"></i>
            </button>
        </div>
        
        <!-- 移动端导航菜单 - 战术地图风格 -->
        <div id="mobileMenu" class="md:hidden bg-darker fixed inset-0 z-50 transform translate-x-full transition-transform duration-300 shadow-xl border-l-2 border-primary/50">
            <div class="flex justify-end p-4">
                <button id="closeMenuBtn" class="text-light text-2xl p-2 bg-primary/10 border border-primary/30">
                    <i class="fa fa-times"></i>
                </button>
            </div>
            <?php if(isset($t['nav']) && !empty($t['nav'])){?>
            <nav class="flex flex-col items-center space-y-6 mt-10">
                <?php foreach ($t['nav'] as $item): ?>
                    <a href="<?php echo isset($item['link']) ? $item['link'] : '#'; ?>" class="text-light text-xl hover:text-primary transition-colors duration-300 w-3/4 text-center py-3 border border-metal/30 bg-dark/50 <?php echo isset($item['isCta']) ? 'bg-primary hover:bg-primary/90 text-white border border-accent/50' : ''; ?>">
                        <?php echo isset($item['name']) ? $item['name'] : ''; ?>
                    </a>
                <?php endforeach; ?>
                
                <!-- 移动端语言选择 -->
                <?php if(isset($t['lang']) && !empty($t['lang'])){?>
                <div class="mt-6 pt-6 border-t border-primary/20 w-3/4">
                    <p class="text-center mb-4 text-light/60"><?php echo isset($t['lang'][$lang]) ? $t['lang'][$lang] : ''; ?></p>
                    <div class="grid grid-cols-2 gap-2">
                        <?php foreach ($availableLangs as $l): ?>
                            <a href="?lang=<?php echo $l; ?>" class="text-center py-2 border border-primary/20 bg-dark/50 rounded-sm hover:bg-primary/10 transition-colors">
                                <?php echo isset($t['lang'][$l]) ? $t['lang'][$l] : ''; ?>
                            </a>
                        <?php endforeach; ?>
                    </div>
                </div>
                <?php }?>
            </nav>
            <?php }?>
        </div>
    </header>

    <!-- 英雄区域/Hero Section - 战场风格 -->
    <?php if(isset($t['hero']) && !empty($t['hero'])){?>
    <section class="relative pt-28 pb-20 md:pt-36 md:pb-28 overflow-hidden hero-pattern">
        <!-- 战场背景装饰 -->
        <div class="absolute top-0 right-0 w-1/2 h-full bg-primary/5 -skew-x-12 transform origin-top-right"></div>
        <div class="absolute -top-20 -left-20 w-80 h-80 bg-primary/10 rounded-full blur-3xl"></div>
        <div class="absolute bottom-10 right-10 w-60 h-60 bg-secondary/10 rounded-full blur-3xl"></div>
        
        <!-- 内容 - 战役部署风格 -->
        <div class="container mx-auto px-4 relative z-10">
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center">
                <div class="order-2 lg:order-1">
                    <?php if(isset($t['hero']['version'])){?>
                    <div class="inline-block px-4 py-1.5 bg-primary/10 text-primary rounded-sm text-sm font-medium mb-6 border border-primary/30 battle-worn">
                        <?php echo $t['hero']['version']; ?>
                    </div>
                    <?php }?>
                    
                    <?php if(isset($t['hero']['title'])){?>
                    <h1 class="text-[clamp(2.2rem,6vw,4rem)] font-display font-bold leading-tight mb-6 text-white text-shadow-lg uppercase tracking-wider">
                        <?php echo $t['hero']['title']; ?>
                    </h1>
                    <?php }?>
                    
                    <?php if(isset($t['hero']['subtitle'])){?>
                    <p class="text-lg text-light/80 mb-8 max-w-lg">
                        <?php echo $t['hero']['subtitle']; ?>
                    </p>
                    <?php }?>
                    
                    <div class="flex flex-wrap gap-4">
                        <?php if(isset($t['hero']['cta1'])){?>
                        <a href="<?php echo isset($t['hero']['cta1']['link']) ? $t['hero']['cta1']['link'] : '#'; ?>" class="px-8 py-3 bg-primary hover:bg-primary/90 text-white rounded-sm font-medium transition-all duration-300 shadow-lg shadow-primary/20 border border-accent/50 animate-flare uppercase tracking-wide">
                            <?php echo isset($t['hero']['cta1']['text']) ? $t['hero']['cta1']['text'] : ''; ?>
                        </a>
                        <?php }?>
                        
                        <?php if(isset($t['hero']['cta2'])){?>
                        <a href="<?php echo isset($t['hero']['cta2']['link']) ? $t['hero']['cta2']['link'] : '#'; ?>" class="px-8 py-3 bg-darker border border-primary/40 text-light hover:bg-primary/5 rounded-sm font-medium transition-all duration-300 flex items-center shadow-lg uppercase tracking-wide">
                            <span><?php echo isset($t['hero']['cta2']['text']) ? $t['hero']['cta2']['text'] : ''; ?></span>
                            <i class="fa <?php echo isset($t['hero']['cta2']['icon']) ? $t['hero']['cta2']['icon'] : ''; ?> ml-2 text-primary"></i>
                        </a>
                        <?php }?>
                    </div>
                    
                    <!-- 战斗数据统计 -->
                    <div class="mt-12 grid grid-cols-3 gap-4">
                        <div class="text-center p-3 border border-primary/20 bg-darker/70 rounded-sm">
                            <div class="text-3xl font-display font-bold text-primary mb-1">5v5</div>
                            <div class="text-light/60 text-sm">公平对战</div>
                        </div>
                        <div class="text-center p-3 border border-primary/20 bg-darker/70 rounded-sm">
                            <div class="text-3xl font-display font-bold text-primary mb-1">100+</div>
                            <div class="text-light/60 text-sm">英雄</div>
                        </div>
                        <div class="text-center p-3 border border-primary/20 bg-darker/70 rounded-sm">
                            <div class="text-3xl font-display font-bold text-primary mb-1">50M+</div>
                            <div class="text-light/60 text-sm">战士</div>
                        </div>
                    </div>
                </div>
                
                <div class="order-1 lg:order-2 relative">
                    <div class="relative z-10 rounded-sm overflow-hidden shadow-2xl transform rotate-1 transition-transform hover:rotate-0 duration-500 border-2 border-primary/30 battle-worn">
                        <img src="https://picsum.photos/id/237/600/700" alt="王者荣耀战斗场景" class="w-full h-auto">
                        <!-- 战场标记 -->
                        <div class="absolute top-4 left-4 bg-primary text-white text-xs px-3 py-1 rounded-sm border border-accent/50">
                            主战场
                        </div>
                    </div>
                    <div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full bg-primary/30 rounded-sm -z-10 blur-xl"></div>
                </div>
            </div>
        </div>
    </section>
    <?php }?>

    <!-- 游戏特色 - 战术优势风格 -->
    <?php if(isset($t['features']) && !empty($t['features']) && isset($t['features']['items']) && !empty($t['features']['items'])){?>
    <section id="features" class="py-20 bg-darker bg-stripe">
        <div class="container mx-auto px-4">
            <div class="text-center max-w-2xl mx-auto mb-16">
                <?php if(isset($t['features']['pretitle'])){?>
                <p class="text-primary font-medium mb-3 uppercase tracking-wider"><?php echo $t['features']['pretitle']; ?></p>
                <?php }?>
                
                <?php if(isset($t['features']['title'])){?>
                <h2 class="text-[clamp(1.8rem,5vw,3rem)] font-display font-bold mb-6 text-white text-shadow uppercase tracking-wider">
                    <?php echo $t['features']['title']; ?>
                </h2>
                <?php }?>
                
                <?php if(isset($t['features']['subtitle'])){?>
                <p class="text-light/70"><?php echo $t['features']['subtitle']; ?></p>
                <?php }?>
            </div>
            
            <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8">
                <?php foreach ($t['features']['items'] as $item): ?>
                    <div class="bg-dark border border-primary/20 rounded-sm p-8 transition-all duration-300 hover:border-primary/40 hover:bg-darker/80 group battle-worn">
                        <div class="w-16 h-16 bg-primary/10 flex items-center justify-center mb-6 border border-primary/30 group-hover:border-primary/60 transition-all duration-300">
                            <i class="fa <?php echo isset($item['icon']) ? $item['icon'] : ''; ?> text-2xl text-primary group-hover:scale-110 transition-transform duration-300"></i>
                        </div>
                        <h3 class="text-xl font-bold mb-4 text-white uppercase tracking-wide"><?php echo isset($item['title']) ? $item['title'] : ''; ?></h3>
                        <p class="text-light/70"><?php echo isset($item['desc']) ? $item['desc'] : ''; ?></p>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </section>
    <?php }?>

    <!-- 英雄展示 - 将领阵容风格 -->
    <?php if(isset($t['characters']) && !empty($t['characters']) && isset($t['characters']['items']) && !empty($t['characters']['items'])){?>
    <section id="characters" class="py-20 bg-dark">
        <div class="container mx-auto px-4">
            <div class="text-center max-w-2xl mx-auto mb-16">
                <?php if(isset($t['characters']['pretitle'])){?>
                <p class="text-primary font-medium mb-3 uppercase tracking-wider"><?php echo $t['characters']['pretitle']; ?></p>
                <?php }?>
                
                <?php if(isset($t['characters']['title'])){?>
                <h2 class="text-[clamp(1.8rem,5vw,3rem)] font-display font-bold mb-6 text-white text-shadow uppercase tracking-wider">
                    <?php echo $t['characters']['title']; ?>
                </h2>
                <?php }?>
                
                <?php if(isset($t['characters']['subtitle'])){?>
                <p class="text-light/70"><?php echo $t['characters']['subtitle']; ?></p>
                <?php }?>
            </div>
            
            <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-6">
                <?php foreach ($t['characters']['items'] as $character): ?>
                    <div class="group relative overflow-hidden rounded-sm bg-darker border border-primary/20 transition-all duration-500 hover:border-primary/40 battle-worn">
                        <img src="<?php echo isset($character['image']) ? $character['image'] : ''; ?>" alt="<?php echo isset($character['alt']) ? $character['alt'] : ''; ?>" class="w-full h-72 object-cover transition-transform duration-700 group-hover:scale-110">
                        <div class="absolute inset-0 bg-gradient-to-t from-darker via-primary/30 to-transparent"></div>
                        <div class="absolute bottom-0 left-0 right-0 p-5">
                            <span class="text-xs text-light/80 mb-1 block bg-primary/30 px-2 py-0.5 rounded-sm inline-block backdrop-blur-sm uppercase tracking-wider">
                                <?php echo isset($character['class']) ? $character['class'] : ''; ?>
                            </span>
                            <h3 class="text-xl font-bold text-white mb-2 text-shadow-sm uppercase tracking-wider"><?php echo isset($character['name']) ? $character['name'] : ''; ?></h3>
                            <p class="text-light/70 text-sm opacity-0 group-hover:opacity-100 transition-opacity duration-300">
                                <?php echo isset($character['desc']) ? $character['desc'] : ''; ?>
                            </p>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
            
            <?php if(isset($t['characters']['moreLink'])){?>
            <div class="text-center mt-12">
                <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 font-medium transition-colors uppercase tracking-wider">
                    <span><?php echo $t['characters']['moreLink']; ?></span>
                    <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>
            <?php }?>
        </div>
    </section>
    <?php }?>

    <!-- 皮肤展示 - 战甲装备风格 -->
    <?php if(isset($t['screenshots']) && !empty($t['screenshots']) && isset($t['screenshots']['items']) && !empty($t['screenshots']['items'])){?>
    <section id="skins" class="py-20 bg-darker bg-stripe">
        <div class="container mx-auto px-4">
            <div class="text-center max-w-2xl mx-auto mb-16">
                <?php if(isset($t['screenshots']['pretitle'])){?>
                <p class="text-primary font-medium mb-3 uppercase tracking-wider"><?php echo $t['screenshots']['pretitle']; ?></p>
                <?php }?>
                
                <?php if(isset($t['screenshots']['title'])){?>
                <h2 class="text-[clamp(1.8rem,5vw,3rem)] font-display font-bold mb-6 text-white text-shadow uppercase tracking-wider">
                    <?php echo $t['screenshots']['title']; ?>
                </h2>
                <?php }?>
                
                <?php if(isset($t['screenshots']['subtitle'])){?>
                <p class="text-light/70"><?php echo $t['screenshots']['subtitle']; ?></p>
                <?php }?>
            </div>
            
            <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
                <?php foreach ($t['screenshots']['items'] as $skin): ?>
                    <div class="relative overflow-hidden rounded-sm group border border-primary/20 transition-all duration-500 hover:border-primary/40 battle-worn">
                        <img src="<?php echo isset($skin['image']) ? $skin['image'] : ''; ?>" alt="<?php echo isset($skin['alt']) ? $skin['alt'] : ''; ?>" class="w-full h-60 object-cover transition-transform duration-700 group-hover:scale-110">
                        <div class="absolute inset-0 bg-gradient-to-t from-darker/90 via-primary/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div>
                        <div class="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300">
                            <button class="bg-primary/90 hover:bg-primary text-white p-3 rounded-sm transition-all duration-300 transform translate-y-4 group-hover:translate-y-0 border border-accent/50">
                                <i class="fa fa-search-plus"></i>
                            </button>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
            
            <?php if(isset($t['screenshots']['moreLink'])){?>
            <div class="text-center mt-12">
                <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 font-medium transition-colors uppercase tracking-wider">
                    <span><?php echo $t['screenshots']['moreLink']; ?></span>
                    <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>
            <?php }?>
        </div>
    </section>
    <?php }?>

    <!-- 赛事部分 - 战役部署风格 -->
    <?php if(isset($t['tournaments']) && !empty($t['tournaments'])){?>
    <section id="tournaments" class="py-20 bg-dark">
        <div class="container mx-auto px-4">
            <div class="text-center max-w-2xl mx-auto mb-16">
                <?php if(isset($t['tournaments']['pretitle'])){?>
                <p class="text-primary font-medium mb-3 uppercase tracking-wider"><?php echo $t['tournaments']['pretitle']; ?></p>
                <?php }?>
                
                <?php if(isset($t['tournaments']['title'])){?>
                <h2 class="text-[clamp(1.8rem,5vw,3rem)] font-display font-bold mb-6 text-white text-shadow uppercase tracking-wider">
                    <?php echo $t['tournaments']['title']; ?>
                </h2>
                <?php }?>
                
                <?php if(isset($t['tournaments']['subtitle'])){?>
                <p class="text-light/70"><?php echo $t['tournaments']['subtitle']; ?></p>
                <?php }?>
            </div>
            
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
                <!-- 主要赛事 - 主战场风格 -->
                <?php if(isset($t['tournaments']['current']) && !empty($t['tournaments']['current'])){?>
                <div class="lg:col-span-2">
                    <div class="bg-darker rounded-sm overflow-hidden border border-primary/20 transition-all duration-300 hover:border-primary/40 h-full battle-worn">
                        <div class="relative">
                            <img src="<?php echo isset($t['tournaments']['current']['image']) ? $t['tournaments']['current']['image'] : ''; ?>" alt="<?php echo isset($t['tournaments']['current']['alt']) ? $t['tournaments']['current']['alt'] : ''; ?>" class="w-full h-64 object-cover">
                            <div class="absolute inset-0 bg-gradient-to-t from-darker via-primary/30 to-transparent"></div>
                            <div class="absolute top-4 left-4 bg-accent text-darker px-3 py-1 rounded-sm text-sm font-bold uppercase tracking-wider">
                                正在进行
                            </div>
                            <div class="absolute bottom-0 left-0 p-6">
                                <h3 class="text-2xl font-bold text-white mb-2 text-shadow-sm uppercase tracking-wider"><?php echo isset($t['tournaments']['current']['title']) ? $t['tournaments']['current']['title'] : ''; ?></h3>
                                <p class="text-light/80 mb-4"><?php echo isset($t['tournaments']['current']['date']) ? $t['tournaments']['current']['date'] : ''; ?></p>
                                <a href="#" class="inline-block px-5 py-2 bg-primary text-white rounded-sm text-sm font-medium hover:bg-primary/90 transition-colors uppercase tracking-wider">
                                    <?php echo isset($t['tournaments']['current']['cta']) ? $t['tournaments']['current']['cta'] : ''; ?>
                                </a>
                            </div>
                        </div>
                        <div class="p-6 grid grid-cols-2 gap-4">
                            <div class="flex items-center">
                                <i class="fa fa-trophy text-accent mr-3 text-xl"></i>
                                <span class="text-light"><?php echo isset($t['tournaments']['current']['prize']) ? $t['tournaments']['current']['prize'] : ''; ?></span>
                            </div>
                            <div class="flex items-center">
                                <i class="fa fa-users text-primary mr-3"></i>
                                <span class="text-light"><?php echo isset($t['tournaments']['current']['teams']) ? $t['tournaments']['current']['teams'] : ''; ?></span>
                            </div>
                        </div>
                    </div>
                </div>
                <?php }?>
                
                <!-- 即将到来的赛事 - 战术计划风格 -->
                <?php if(isset($t['tournaments']['upcoming']) && !empty($t['tournaments']['upcoming'])){?>
                <div class="bg-darker rounded-sm border border-primary/20 p-6 transition-all duration-300 hover:border-primary/40 battle-worn">
                    <h3 class="text-xl font-bold mb-6 text-white uppercase tracking-wider">即将到来的战役</h3>
                    <div class="space-y-6">
                        <?php foreach ($t['tournaments']['upcoming'] as $tournament): ?>
                            <div class="flex justify-between items-center pb-6 border-b border-primary/10 last:border-0 last:pb-0">
                                <div>
                                    <h4 class="font-bold text-white uppercase tracking-wide"><?php echo isset($tournament['name']) ? $tournament['name'] : ''; ?></h4>
                                    <p class="text-light/60 text-sm mt-1"><?php echo isset($tournament['date']) ? $tournament['date'] : ''; ?></p>
                                </div>
                                <i class="fa fa-arrow-right text-primary"></i>
                            </div>
                        <?php endforeach; ?>
                    </div>
                    
                    <?php if(isset($t['tournaments']['moreLink'])){?>
                    <div class="mt-8">
                        <a href="#" class="inline-flex items-center text-primary hover:text-primary/80 font-medium transition-colors uppercase tracking-wider">
                            <span><?php echo $t['tournaments']['moreLink']; ?></span>
                            <i class="fa fa-arrow-right ml-2"></i>
                        </a>
                    </div>
                    <?php }?>
                </div>
                <?php }?>
            </div>
        </div>
    </section>
    <?php }?>

    <!-- 页脚 - 军事基地风格 -->
    <?php if(isset($t['footer']) && !empty($t['footer'])){?>
    <footer class="bg-darker pt-16 pb-8 border-t border-primary/20">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-12">
                <!-- 品牌介绍 - 军事徽章风格 -->
                <div class="lg:col-span-1">
                    <div class="flex items-center mb-6">
                        <div class="w-12 h-12 bg-primary flex items-center justify-center mr-3 border-2 border-accent battle-worn">
                            <span class="font-display text-white text-2xl font-bold tracking-wider">王</span>
                        </div>
                        <h2 class="text-2xl font-display text-white tracking-wider uppercase">王者荣耀</h2>
                    </div>
                    
                    <?php if(isset($t['footer']['description'])){?>
                    <p class="text-light/70 mb-6">
                        <?php echo $t['footer']['description']; ?>
                    </p>
                    <?php }?>
                    
                    <!-- 社交媒体链接 - 通讯频道风格 -->
                    <div class="flex space-x-4 mb-6">
                        <a href="#" class="w-10 h-10 bg-dark border border-primary/20 flex items-center justify-center text-light hover:bg-primary/10 hover:text-primary transition-colors battle-worn">
                            <i class="fa fa-weibo"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-dark border border-primary/20 flex items-center justify-center text-light hover:bg-primary/10 hover:text-primary transition-colors battle-worn">
                            <i class="fa fa-wechat"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-dark border border-primary/20 flex items-center justify-center text-light hover:bg-primary/10 hover:text-primary transition-colors battle-worn">
                            <i class="fa fa-youtube-play"></i>
                        </a>
                        <a href="#" class="w-10 h-10 bg-dark border border-primary/20 flex items-center justify-center text-light hover:bg-primary/10 hover:text-primary transition-colors battle-worn">
                            <i class="fa fa-instagram"></i>
                        </a>
                    </div>
                    
                    <!-- 订阅 - 战地情报风格 -->
                    <?php if(isset($t['footer']['subscribe'])){?>
                    <div>
                        <h3 class="font-bold text-white mb-3 uppercase tracking-wider"><?php echo $t['footer']['subscribe']; ?></h3>
                        <?php if(isset($t['footer']['subscribeDesc'])){?>
                        <p class="text-light/60 text-sm mb-4"><?php echo $t['footer']['subscribeDesc']; ?></p>
                        <?php }?>
                        <form class="mb-3">
                            <div class="flex">
                                <input type="email" placeholder="<?php echo isset($t['footer']['subscribePlaceholder']) ? $t['footer']['subscribePlaceholder'] : ''; ?>" class="flex-1 px-4 py-3 rounded-l-sm bg-dark border border-primary/20 text-light focus:outline-none focus:border-primary">
                                <button type="submit" class="bg-primary text-white px-4 rounded-r-sm hover:bg-primary/90 transition-colors">
                                    <i class="fa fa-paper-plane"></i>
                                </button>
                            </div>
                        </form>
                        <?php if(isset($t['footer']['privacyNote'])){?>
                        <p class="text-light/50 text-xs"><?php echo $t['footer']['privacyNote']; ?></p>
                        <?php }?>
                    </div>
                    <?php }?>
                </div>
                
                <!-- 链接 - 战术手册风格 -->
                <?php if(isset($t['footer']['links']) && !empty($t['footer']['links'])){?>
                <div class="lg:col-span-3 grid grid-cols-1 sm:grid-cols-2 gap-8">
                    <?php foreach ($t['footer']['links'] as $linkGroup): ?>
                        <div>
                            <h3 class="font-bold text-white mb-6 uppercase tracking-wider"><?php echo isset($linkGroup['title']) ? $linkGroup['title'] : ''; ?></h3>
                            <ul class="space-y-4">
                                <?php foreach ($linkGroup['items'] as $item): ?>
                                    <li>
                                        <a href="<?php echo isset($item['link']) ? $item['link'] : '#'; ?>" class="text-light/70 hover:text-primary transition-colors">
                                            <?php echo isset($item['name']) ? $item['name'] : ''; ?>
                                        </a>
                                    </li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    <?php endforeach; ?>
                </div>
                <?php }?>
            </div>
            
            <!-- 法律链接 - 军事条例风格 -->
            <div class="border-t border-primary/10 pt-8 pb-6">
                <?php if(isset($t['footer']['legalLinks']) && !empty($t['footer']['legalLinks'])){?>
                <div class="flex flex-wrap justify-center gap-4 md:gap-8 mb-6">
                    <?php foreach ($t['footer']['legalLinks'] as $link): ?>
                        <a href="<?php echo isset($link['link']) ? $link['link'] : '#'; ?>" class="text-light/60 hover:text-primary text-sm transition-colors">
                            <?php echo isset($link['name']) ? $link['name'] : ''; ?>
                        </a>
                    <?php endforeach; ?>
                </div>
                <?php }?>
                
                <!-- 版权信息 - 军事机密风格 -->
                <?php if(isset($t['footer']['copyright'])){?>
                <p class="text-center text-light/50 text-sm">
                    <?php echo $t['footer']['copyright']; ?>
                </p>
                <?php }?>
            </div>
        </div>
    </footer>
    <?php }?>

    <!-- JavaScript 交互 -->
    <script>
        // 导航栏滚动效果 - 战地指挥中心风格
        window.addEventListener('scroll', function() {
            const navbar = document.getElementById('navbar');
            if (navbar && window.scrollY > 50) {
                navbar.classList.add('shadow-md', 'shadow-primary/10');
                navbar.classList.remove('bg-darker/90');
                navbar.classList.add('bg-darker');
            } else if (navbar) {
                navbar.classList.remove('shadow-md', 'shadow-primary/10');
                navbar.classList.add('bg-darker/90');
                navbar.classList.remove('bg-darker');
            }
        });
        
        // 语言选择器 - 通讯加密风格
        const langToggle = document.getElementById('langToggle');
        const langDropdown = document.getElementById('langDropdown');
        
        if (langToggle && langDropdown) {
            langToggle.addEventListener('click', function() {
                langDropdown.classList.toggle('hidden');
            });
            
            // 点击外部关闭下拉菜单
            document.addEventListener('click', function(event) {
                if (!langToggle.contains(event.target) && !langDropdown.contains(event.target)) {
                    langDropdown.classList.add('hidden');
                }
            });
        }
        
        // 移动端菜单 - 战术地图风格
        const mobileMenuBtn = document.getElementById('mobileMenuBtn');
        const closeMenuBtn = document.getElementById('closeMenuBtn');
        const mobileMenu = document.getElementById('mobileMenu');
        
        if (mobileMenuBtn && closeMenuBtn && mobileMenu) {
            mobileMenuBtn.addEventListener('click', function() {
                mobileMenu.classList.remove('translate-x-full');
            });
            
            closeMenuBtn.addEventListener('click', function() {
                mobileMenu.classList.add('translate-x-full');
            });
            
            // 点击菜单链接后关闭菜单
            const mobileLinks = mobileMenu.querySelectorAll('a');
            mobileLinks.forEach(link => {
                link.addEventListener('click', function() {
                    mobileMenu.classList.add('translate-x-full');
                });
            });
        }
        
        // 平滑滚动 - 战略移动风格
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                
                const targetId = this.getAttribute('href');
                if (targetId === '#') return;
                
                const targetElement = document.querySelector(targetId);
                if (targetElement) {
                    window.scrollTo({
                        top: targetElement.offsetTop - 80,
                        behavior: 'smooth'
                    });
                }
            });
        });
        
        // 添加图片加载动画效果 - 战场迷雾消散风格
        document.addEventListener('DOMContentLoaded', function() {
            const images = document.querySelectorAll('img');
            images.forEach(img => {
                img.classList.add('opacity-0', 'transition-opacity', 'duration-1000');
                img.onload = function() {
                    this.classList.remove('opacity-0');
                    this.classList.add('opacity-100');
                }
                // 如果图片已经缓存
                if (img.complete) {
                    img.classList.remove('opacity-0');
                    img.classList.add('opacity-100');
                }
            });
        });
    </script>
</body>
</html>
    